home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7988 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.internetMCI.com!news-admin
  2. From: "Michael P. Lascuola" <mlascuola@mcimail.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: DDE error send text delimiters
  5. Date: Fri, 16 Feb 1996 14:40:51 -0700
  6. Organization: InternetMCI
  7. Message-ID: <3124F9E3.262B@mcimail.com>
  8. NNTP-Posting-Host: 166.37.9.79
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b6a (Win95; I)
  13.  
  14. HELP!!
  15.  
  16. DDE Question:
  17.  
  18. I have a Visual FoxPro DDE server set up using DDE to 
  19. process SQL queries.  All is OK, except for when I need 
  20. to send a UDF call as part of a query.
  21.  
  22. When sending the DDE request, I get errors if I try to send
  23. characters like quotes("), single quote ('), brackets ([]),
  24. or even a caret (^) to delimit strings inside an item.
  25.  
  26. I've tried sending a backslash escape character before the
  27. offending character but to no avail.
  28.  
  29. For example, to send a single quote, I've tried all of these, with
  30. the same error message:
  31.  
  32.   String        Error
  33. --------        --------------------------------
  34.    '            DMLERR_INVALIDPARAMETER
  35.    \'           DMLERR_INVALIDPARAMETER
  36.    \\'          DMLERR_INVALIDPARAMETER
  37.    ''           DMLERR_INVALIDPARAMETER
  38.  
  39.  
  40.  
  41.  
  42. Here is an example of the code creating this problem:
  43.  
  44. C++ side:
  45.    strcpy(cpQuery, "SELECT UDF('ACCESS') FROM CDR.DBF") ;
  46.    hRetData = DdeClientTransaction((unsigned char*)cpQuery,
  47.        strlen(cpQuery) + 1,
  48.        hConv,
  49.        hszTopic2,
  50.        CF_TEXT,
  51.        XTYP_REQUEST,
  52.        TIMEOUT_ASYNC,
  53.        NULL);
  54.  
  55.  
  56.  
  57. Any thoughts??
  58.